
#include "tcpClient.hpp"
#include <memory>

using namespace Client;

// 提示 运行格式
static void Usage(string proc)
{
    cout<<"Usage:\n\t" << proc <<" server_ip server_port\n\n";
}
// ./tcpClient server_ip_ip server_port
int main(int argc,char* argv[])
{
    if(argc != 3)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }
    string serverip = argv[1];
    uint16_t serverport = atoi(argv[2]);

    unique_ptr<tcpClient> tpcl(new tcpClient(serverip, serverport));
    tpcl->ininClinet();
    tpcl->start();

    return 0;
}